package com.example.demo.entity;

import java.util.List;

public class UG extends Student{

    @Override
    public void checkCredits() {
        List<Module> modules = getModules();
        Integer credits = 0;
        for (Module module : modules) {
            credits += Integer.parseInt(module.getCredits());
        }
        if (credits >= 120) {
            System.out.println("获得了正确数量的学分");
        }else {
            System.out.println("没有获得正确数量的学分");
        }
    }

    @Override
    public String getSupervisorName() {
        return null;
    }

    @Override
    public String getStudentType() {
        return "UG";
    }
}
